(function($) {
    var arkflow = $.arkflow;

	arkflow.ResizerPoint = Base.extend({
        constructor: function(name, cursor, resizer) {
            this.resizer = resizer;
            this.paper = resizer.paper;
            this.name = name;
            this.cursor = cursor;

            this.init();
        },
        init: function() {
            var me = this;
            this.comp = this.paper.rect(0, 0, this.resizer.resizePointSize, this.resizer.resizePointSize)
                .attr({
                    fill : "#000",
                    stroke : "#fff",
                    cursor : this.cursor
                }).hide().drag(function(w, h) {
                    me.resetSize(w, h);
                }, function() {
                    me.resizer.resetPosition(this.attr("x") + me.resizer.resizePointSize / 2,
                        this.attr("y") + me.resizer.resizePointSize / 2, me.name);
                }, function() {
                });
        },
        onResetSize: function(W, H) {
        },
        // 重置各类型节点元素大小尺寸
        resetSize : function(w, h) {
            if (!arkflow.config.editable) {
                return;
            }
            var W = this.resizer._bx + w;
            var H = this.resizer._by + h;
            this.onResetSize(W,H);
            this.resizer.onResizer();
        },
        redraw: function(){
        },
        show: function() {
            this.comp.show();
        },
        hide: function() {
            this.comp.hide();
        },
        remove: function() {
            this.comp.remove();
        }
    });
})(jQuery);